import time
from pathlib import Path

from service.consolidators.electrical.consolidator import Consolidator, Bidder


def test_electrical_consolidator():
    consolidator = Consolidator(
        tender_document=Path("F:\\招标\\new\\10月\\4季度电气材料\\tender.xlsx"),
        summary_document=Path("F:\\招标\\new\\10月\\4季度电气材料\\summary.xlsx"),
    )
    consolidator.load_tender()
    consolidator.add_bids(
        [
            Bidder(
                name="供应商A",
                document=Path("F:\\招标\\new\\10月\\4季度电气材料\\bidder_a.xlsx"),
            ),
            Bidder(
                name="供应商B",
                document=Path("F:\\招标\\new\\10月\\4季度电气材料\\bidder_b.xlsx"),
            ),
        ]
    )
    consolidator.save()


start = time.time()
test_electrical_consolidator()
print(time.time() - start)
